import request from '@/utils/request';
import { other } from './prefix';

const menuManage = {
  // 查询菜单列表
  getMenu(params) {
    return request.get(other + '/menu', { params });
  },
  // 创建菜单
  setMenu(params) {
    return request.post(other + '/menu', params);
  },
  // 更新菜单
  updMenu(id, params) {
    return request.post(other + '/menu/' + id, params);
  },
  // 删除菜单
  delMenu(id) {
    return request.delete(other + '/menu/' + id);
  },
};

export default menuManage;
